//
//  XD_PingTaiCertItemCell.swift
//  XueDao
//
//  Created by wenwen on 2021/3/31.
//

import UIKit

class XD_PingTaiCertItemCell: UICollectionViewCell {
    
    lazy var imgView: UIImageView = {
        let imgView = UIImageView()
        imgView.layer.masksToBounds = true
        imgView.layer.cornerRadius = .scale * 4
        return imgView
    }()
    lazy var nameLabel: UILabel = {
        let nameLabel = UILabel()
        nameLabel.textAlignment = .center
        nameLabel.font = .systemFont(ofSize: .scale * 14, weight: .medium)
        nameLabel.textColor = UIColor(red: 0.22, green: 0.24, blue: 0.25, alpha: 1.00)
        
        return nameLabel
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        contentView.addSubview(imgView)
        imgView.snp.makeConstraints { (make) in
            make.top.left.right.equalToSuperview()
            make.height.equalTo(imgView.snp.width).multipliedBy(132 / 132)
        }
        
        contentView.addSubview(nameLabel)
        nameLabel.snp.makeConstraints { (make) in
            make.bottom.left.right.equalToSuperview()
            make.top.equalTo(imgView.snp.bottom).offset(4)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
